const path = require('path');
var prod = process.env.NODE_ENV === 'production';

module.exports = {
    wpyExt: '.wpy',
    cliLogs: !prod,
    static: [
        'src/images',
        'src/vant'
    ],
    build: {},
    resolve: {
        alias: {
            '@': path.join(__dirname, 'src'),
            '@vant': path.join(__dirname, 'src/vant')
        },
        aliasFields: ['wepy', 'weapp'],
        modules: ['node_modules']
    },
    compilers: {
        less: {
            compress: prod
        },
        babel: {
            sourceMap: true,
            presets: [
                '@babel/preset-env'
            ],
            plugins: [
                '@wepy/babel-plugin-import-regenerator'
            ]
        }
    },
    plugins: [],
    appConfig: {
        noPromiseAPI: ['createSelectorQuery']
    }
};
